<script>
    jQuery(document).ready(function(){
       
        jQuery('#combocat').click(function(){
            jQuery('#dialog').dialog({
                 
            }); return false;
           
        });
        
        });
           
   
    function onClickCat(id,val){
        jQuery('#Category_Code').val(val);
        jQuery('#Category_Name').val(id);
         jQuery('#dialog').dialog("close");
    }
</script>    
<?php echo $this->form;?>

<div id="dialog" style="display:none" title="Category Master">
    <ul>
    <?php foreach($this->cat as $cat): ?>
        <li>
            <a href="" name="<?php echo $cat['category_code']; ?>" id="<?php echo $cat['category_name']; ?>" onclick="onClickCat(this.id,this.name); return false;"> <?php echo $cat['category_name']; ?></a>
        </li>
    <?php endforeach;?>
    </ul>
</div>
